<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<div class="pagebar" url="<s:property value="#request.pagination.url" />"
	name="pagebar_<s:property value="#request.pagination.pageno" />_<s:property value="#request.pagination.orderBy" />_<s:property value="#request.pagination.orderType" />">

	<s:if test="#request.pagination.pageno>1">
		<a
			class="first ui-button ui-widget ui-state-default ui-button-text-only"
			href="<s:property value="#request.pagination.url" />?pagination.pageno=<s:property value="#request.pagination.pageno-1" />&pagination.orderBy=<s:property value="#request.pagination.orderBy" />&pagination.orderType=<s:property value="#request.pagination.orderType" />"><span
			class="ui-button-text">上一页 </span> </a>
	</s:if>

	<s:if test="#request.pagination.pagecount>6">

		<a
			class="ui-button ui-widget ui-state-default ui-button-text-only <s:if test="#request.pagination.pageno==1">first here</s:if>"
			href="<s:property value="#request.pagination.url" />?pagination.pageno=1&pagination.orderBy=<s:property value="#request.pagination.orderBy" />&pagination.orderType=<s:property value="#request.pagination.orderType" />"><span
			class="ui-button-text">1<s:if
					test="#request.pagination.pageno>4">...</s:if> </span> </a>
		<s:iterator value="#request.pagination.range" status="status">
			<a
				class="ui-button ui-widget ui-state-default ui-button-text-only <s:if test="pagination.range[#status.index]==#request.pagination.pageno">here</s:if>"
				href="<s:property value="#request.pagination.url" />?pagination.pageno=<s:property value="#request.pagination.range[#status.index]"/>&pagination.orderBy=<s:property value="#request.pagination.orderBy" />&pagination.orderType=<s:property value="#request.pagination.orderType" />"><span
				class="ui-button-text"><s:property
						value="#request.pagination.range[#status.index]" /> </span> </a>
		</s:iterator>
		<a
			class="ui-button ui-widget ui-state-default ui-button-text-only <s:if test="#request.pagination.pageno==#request.pagination.pagecount">last here</s:if>"
			href="<s:property value="#request.pagination.url" />?pagination.pageno=<s:property value="#request.pagination.pagecount" />&pagination.orderBy=<s:property value="#request.pagination.orderBy" />&pagination.orderType=<s:property value="#request.pagination.orderType" />"><span
			class="ui-button-text"><s:if
					test="#request.pagination.pageno<#request.pagination.pagecount-3">...</s:if>
				<s:property value="#request.pagination.pagecount" /> </span> </a>

	</s:if>
	<s:else>
		
		<s:iterator value="#request.pagination.range" status="status">
		
			<a
				class="ui-button ui-widget ui-state-default ui-button-text-only <s:if test="pagination.range[#status.index]==#request.pagination.pageno">here</s:if>"
				href="<s:property value="#request.pagination.url" />?pagination.pageno=<s:property value="#request.pagination.range[#status.index]"/>&pagination.orderBy=<s:property value="#request.pagination.orderBy" />&pagination.orderType=<s:property value="#request.pagination.orderType" />"><span
				class="ui-button-text"><s:property
						value="#request.pagination.range[#status.index]" /> </span> </a>
		</s:iterator>
	</s:else>
	<s:if test="#request.pagination.pageno<#request.pagination.pagecount">
		<a
			href="<s:property value="#request.pagination.url" />?pagination.pageno=<s:property value="#request.pagination.pageno+1" />&pagination.orderBy=<s:property value="#request.pagination.orderBy" />&pagination.orderType=<s:property value="#request.pagination.orderType" />"
			class="last ui-button ui-widget ui-state-default ui-button-text-only"><span
			class="ui-button-text">下一页</span> </a>
	</s:if>
</div>
